package com.dataextend.bean;


import java.io.Serializable;

public class BusinessException extends RuntimeException implements Serializable {
    private static final long serialVersionUID = 1391406589054262345L;
    private String code;
    private Object[] params;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Object[] getParams() {
        return params;
    }

    public void setParams(Object[] params) {
        this.params = params;
    }

    public BusinessException(String code){
        this.code = code;
    }

    public BusinessException(String code, Object[] params){
        this.code = code;
        this.params = params;
    }

    public BusinessException(String code, String message){
        super(message);
        this.code=code;
    }

    public BusinessException(String code, String message, Object[] params){
        super(message);
        this.code = code;
        this.params = params;
    }

    public BusinessException(String code, String message, Throwable cause){
        super(message, cause);
        this.code = code;
    }

    public BusinessException(String code, String message, Object[] params, Throwable cause){
        super(message, cause);
        this.code = code;
        this.params = params;
    }

    public BusinessException(String code, Throwable cause){
        super(cause);
        this.code = code;
    }

    public BusinessException(String code, String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace){
        super(message, cause, enableSuppression, writableStackTrace);
        this.code = code;
    }


}
